package com.tczs.web.config;

import com.tczs.dispatch.AbstractServerExecute;
import com.tczs.dispatch.CollectAction;
import com.tczs.dispatch.Handler;
import com.tczs.server.request.ServerRequestModel;
import com.tczs.web.action.LoginAction;
import io.netty.handler.codec.http.FullHttpResponse;
import io.netty.util.internal.StringUtil;

/**
 * 执行action之前校验ip是否是白名单
 */
public class CustomerServerExecute extends AbstractServerExecute {

    @Override
    public ServerRequestModel beforeExecute(ServerRequestModel serverRequestModel) {
        LoginIntercept.checkLogin(serverRequestModel);
        return serverRequestModel;
    }

    @Override
    public FullHttpResponse afterExecute(FullHttpResponse fullHttpResponse) {
        return fullHttpResponse;
    }
}
